home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmiSoft / Comm / misc / trsi-ftpd01.lha / FAME-FTPd / source / struct_ex.h < prev    next >
C/C++ Source or Header  |  2004-04-24  |  5KB  |  201 lines

  1. /****************************************************************************************
  2.  *  PROJECT: FAME-FTPd
  3.  *     FILE: struct_ex.h
  4.  *  PURPOSE: FTP related structures and global variables - external definitions
  5.  *  CREATED: 05-MAY-2003
  6.  * MODIFIED: 24-APR-2004
  7.  *   AUTHOR: Sascha 'SieGeL' Pfalz
  8.  ****************************************************************************************/
  9.  
  10. #include "global_defines.h"
  11.  
  12. extern struct Library             *SocketBase;
  13. extern struct Library             *UtilityBase;
  14. extern struct FAMELibrary        *FAMEBase;
  15. extern struct LocaleBase         *LocaleBase;
  16. extern struct Locale                 *myloc;
  17. extern struct Library             *SysLogBase;
  18. extern struct IntuitionBase    *IntuitionBase; /* Required for EasyRequest() */
  19.  
  20. /*
  21.  *  server_socket is our socket comming from InetD
  22.  */
  23.  
  24. extern LONG     server_socket;
  25.  
  26. /*
  27.  *  As we initialize bsdsocket.library we have to supply also our own error vars
  28.  */
  29.  
  30. extern int     errno,h_errno;
  31. extern char *_ProgramName;
  32.  
  33. /*
  34.  *  Memory pointers for general I/O
  35.  */
  36.  
  37. extern char *readbuf;
  38. extern char *readtmp;
  39. extern char *uspbuf;
  40. extern APTR filebuf;
  41.  
  42. /*  Our global FAME info structure, will be filled by Obtaining() FAME semaphore
  43.  *  and copy all informations from the semaphore into this structure
  44.  */
  45.  
  46. struct FAMEInfos
  47.     {
  48.     char    BBSName[256];
  49.     char    SysOp[32];
  50.     long    FAMEVersion,
  51.                 FAMERevision,
  52.                 NodeCount;
  53.   ULONG FileULBytesHi,        // Only file transfer stats
  54.                 FileULBytesLo;
  55.   ULONG FileDLBytesHi,
  56.                 FileDLBytesLo;
  57.     ULONG    FilesUL,                    // Amount of Files transfered
  58.         FilesDL;
  59.     };
  60.  
  61. extern struct FAMEInfos *FameInfo;
  62.  
  63. /*
  64.  *  Global list structure for conference lists:
  65.  */
  66.  
  67. extern struct FConf
  68.     {
  69.   struct     FConf *next;
  70.     char    ConfName[32],
  71.                     ConfLocation[102],
  72.                     ULPath[102],
  73.                     DLPath[102],
  74.                     AddULPath[102],
  75.                     AddDLPath[102];
  76.     long        ConfNumber;
  77.     }*fconf1,*fconf2;
  78.  
  79. /*
  80.  *  Preferences structure, used also by FAME-FTPdCFG:
  81.  */
  82.  
  83. extern struct FTPdConfig
  84.     {
  85.     char    HowToUploadFile[256];        // How-To-Upload file
  86.     ULONG    Flags1;                 // Option flags, see global_defines.h
  87.     char  UploadTempPath[256];        // Temporary upload path
  88.     long    FileNameLength,                    // Max. allowed filename length
  89.                 FileBufferSize;                    // Size for Buffer
  90.     ULONG    Timeout;                                // Timeout in seconds
  91.     char    IPFile[256],                        // Path to file containing IP Address to use
  92.         TitleFile[256];         // Path to ASCII/ANSI file showing login gfx
  93.     int        PortLo,                                    // Passive port range, low value
  94.                 PortHi;                 // Passive port range, high value
  95.     char    LogFile[256];                        // Full filename for Logfile (not debug!)
  96.     long  MaxUsers;                                // If > 0 the Server must check for users online count
  97.     };
  98.  
  99. extern struct FTPdConfig *fconfig;
  100.  
  101. /*
  102.  *  Memorypointer for our Pool:
  103.  */
  104.  
  105. extern APTR mem_pool;
  106.  
  107. /*
  108.  *  Pointer to global FileInfoBlock structure (allocated in main() )
  109.  */
  110.  
  111. extern struct FileInfoBlock *fib;
  112.  
  113. /*
  114.  *  UploadList contains all uploaded file that where recieved during a running session
  115.  */
  116.  
  117. extern struct FTPUploads
  118.     {
  119.     struct    MinNode Node;
  120.   char    FileName[128],
  121.                     FileDate[LEN_DATSTRING*2];
  122.     long    FileSize,
  123.                     ConfNum;
  124.     };
  125.  
  126. extern struct    MinList filelist;
  127.  
  128. extern struct FTPdStats
  129.     {
  130.     char    TaskAddress[10];
  131.     long    UserNumber,
  132.                 CurrentConf;                    // Conference Number
  133.     char    ActionString[80];
  134.     long    ULFiles;
  135.     ULONG    ULBytesHi,
  136.                 ULBytesLo;
  137.   char    ConnectTime[18],
  138.                 ULName[102];                    // Will be set to current upload file
  139.     };
  140.  
  141. extern struct FTPdStats *fstats;    // Used by current user
  142. extern struct FTPdStats *tmpptr;    // Used to find data inside datfile
  143.  
  144. /*
  145.  *  This structure is used at the end of session, it saves the upload states
  146.  *  as binary data for aCID-tOP so that uploads can be counted correctly.
  147.  */
  148.  
  149. extern struct AcidStats
  150.     {
  151.     long    UserNumber,
  152.                 ConfNumber,
  153.                 ULFiles;
  154.     ULONG    BytesHi,
  155.                 BytesLo;
  156.     };
  157.  
  158.  
  159. /* FTP Response codes */
  160.  
  161. extern char sending[];            /* 150 */
  162. extern char filesend[];     /* 150 */
  163. extern char typeok[];                /* 200 */
  164. extern char portok[];                /* 200 */
  165. extern char okay[];                    /* 200 */
  166. extern char stru_ok[];            /* 200 */
  167. extern char mode_ok[];            /* 200 */
  168. extern char size[];                    /* 213 */
  169. extern char systreply[];        /* 215 */
  170. extern char banner[];                /* 220 */
  171. extern char bye[];                    /* 221 */
  172. extern char abor_ok[];            /* 225 */
  173. extern char rxok[];                    /* 226 */
  174. extern char txok[];                    /* 226 */
  175. extern char pasvcon[];            /* 227 */
  176. extern char logged[];                /* 230 */
  177. extern char cwdmsg[];                /* 250 */
  178. extern char pwdmsg[];                /* 257 */
  179. extern char givepass[];            /* 331 */
  180. extern char ftperror[];            /* 421 */
  181. extern char noconn[];                /* 425 */
  182. extern char noopendata[];   /* 425 */
  183. extern char nopasv[];                /* 425 */
  184. extern char fileerror[];        /* 451 */
  185. extern char unsupp[];                /* 500 */
  186. extern char badcmd[];                /* 500 */
  187. extern char only8[];                /* 501 */
  188. extern char badtype[];            /* 501 */
  189. extern char badport[];            /* 501 */
  190. extern char unimp[];                /* 502 */
  191. extern char mode_fail[];        /* 502 */
  192. extern char userfirst[];        /* 503 */
  193. extern char stru_fail[];        /* 504 */
  194. extern char notlog[];                /* 530 */
  195. extern char noperm[];                /* 550 */
  196. extern char onlinewarn[];        /* 550 */
  197. extern char filenotfound[];    /* 550 */
  198. extern char nodir[];        /* 553 */
  199. extern char cantmake[];            /* 553 */
  200. extern char fileexists[];        /* 553 */
  201.